// 分拣配套路由
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const SORTING_MATCHING: AppRouteRecordRaw = {
  path: '/sorting-matching',
  name: '分拣配套',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.sorting-matching',
    requiresAuth: true,
    ignoreCache: false,
    icon: 'icon-layers ',
    roles: ['*'],
    order: 2,
  },
  children: [
    // 配套任务
    {
      path: '/supporting-task',
      name: '配套任务',
      component: () =>
        import('@/views/sorting-matching/list/supporting-task/index.vue'),
      meta: {
        locale: 'menu.supportingTask',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 分拣预配套
    {
      path: '/sorting-pre-matching',
      name: '分拣预配套',
      component: () =>
        import('@/views/sorting-matching/list/sorting-pre-matching/index.vue'),
      meta: {
        locale: 'menu.sortingPreMatching',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 分拣操作
    {
      path: '/sorting-management',
      name: '分拣操作',
      component: () =>
        import('@/views/sorting-matching/list/sorting-management/index.vue'),
      meta: {
        locale: 'menu.sortingManagement',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 故障改派
    {
      path: '/sort-management-do',
      name: '故障改派',
      component: () =>
        import('@/views/sorting-matching/list/sort-management-do/index.vue'),
      meta: {
        locale: 'menu.sortManagementdo',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 工艺更改分拣
    {
      path: '/change-sort',
      name: '工艺更改分拣',
      component: () =>
        import('@/views/sorting-matching/list/change-sort/index.vue'),
      meta: {
        locale: 'menu.changeSort',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // // 工作包拆包（工艺更改）
    // {
    //   path: '/workpackage-unpack',
    //   name: '工作包拆包(工艺更改)',
    //   component: () =>
    //     import('@/views/sorting-matching/list/workpackage-unpack/index.vue'),
    //   meta: {
    //     locale: 'menu.workpackageUnpack',
    //     requiresAuth: true,
    //     ignoreCache: false,
    //     roles: ['*'],
    //   },
    // },
    // // 工作包取消
    // {
    //   path: '/workpackage-cancellation',
    //   name: '工作包取消',
    //   component: () =>
    //     import(
    //       '@/views/sorting-matching/list/workpackage-cancellation/index.vue'
    //     ),
    //   meta: {
    //     locale: 'menu.workpackageCancellation',
    //     requiresAuth: true,
    //     ignoreCache: false,
    //     roles: ['*'],
    //   },
    // },
    // AO替换
    {
      path: '/workpackage-replacement',
      name: 'AO替换',
      component: () =>
        import(
          '@/views/sorting-matching/list/workpackage-replacement/index.vue'
        ),
      meta: {
        locale: 'menu.workpackageReplacement',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // // 接收分拣
    // {
    //   path: '/receive-sorting',
    //   name: '接收分拣',
    //   component: () =>
    //     import('@/views/sorting-matching/list/receive-sorting/index.vue'),
    //   meta: {
    //     locale: 'menu.receiveSorting',
    //     requiresAuth: true,
    //     ignoreCache: false,
    //     roles: ['*'],
    //   },
    // },
    // 工作包分拣
    // {
    //   path: '/workpakage-sort',
    //   name: '工作包分拣',
    //   component: () =>
    //     import('@/views/sorting-matching/list/workpakage-sort/index.vue'),
    //   meta: {
    //     locale: 'menu.workpakageSort',
    //     requiresAuth: true,
    //     ignoreCache: false,
    //     roles: ['*'],
    //   },
    // },
    // 预配套任务查询
    {
      path: '/pre-match-task-query',
      name: '预配套任务查询',
      component: () =>
        import('@/views/sorting-matching/list/pre-match-task-query/index.vue'),
      meta: {
        locale: 'menu.preMatchTaskQuery',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 工作包拆包（非工艺更改）
    {
      path: '/workpackage-unpack-not-gygg',
      name: '工作包拆包(非工艺更改)',
      component: () =>
        import(
          '@/views/sorting-matching/list/workpackage-unpack-not-gygg/index.vue'
        ),
      meta: {
        locale: 'menu.workpackageUnpackNotGygg',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 分拣任务综合查询
    {
      path: '/sort-task-query',
      name: '分拣任务综合查询',
      component: () =>
        import('@/views/sorting-matching/list/sort-task-query/index.vue'),
      meta: {
        locale: 'menu.sortTaskQuery',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 计划管理
    {
      path: '/plan-manage',
      name: '计划管理',
      component: () =>
        import('@/views/sorting-matching/list/plan-manage/index.vue'),
      meta: {
        locale: 'menu.planManage',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
  ],
};

export default SORTING_MATCHING;
